home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
19
/
madtrb11.zip
/
TIME.INC
< prev
next >
Wrap
Text File
|
1985-08-05
|
534b
|
25 lines
{
FUNCTION Time
Source: "TIME: A Function To Measure Elapsed Time", TUG Lines Volume I Issue 3
Author: Herb Holden
Application: PC-DOS/MS-DOS
}
Function time: real ; (* HLH 6/6/84 *)
Type registers = record
ax,bx,cx,dx: integer
end ;
var r:registers ;
begin
r.ax := $2C00 ;
intr($21,r) ;
with r do
time:= (cx shr 8)*3600+(cx and $00FF )*60
+(dx shr 8) +(dx and $00FF) /100 ;
end;
{Note: cx and $00FF is substantially faster than cx mod 256!}